package com.eian.boot.module.system.associations.user.role.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.util.List;

/**
 * 用户角色删除事件
 * 当用户被删除导致其所有角色关系被清理时触发
 *
 * @author alex.meng
 * @since 1.0.0
 */
@Getter
public class UserRoleRemovedEvent extends ApplicationEvent {

    private final Long userId;
    private final List<Long> roleIds;

    public UserRoleRemovedEvent(Object source, Long userId, List<Long> roleIds) {
        super(source);
        this.userId = userId;
        this.roleIds = roleIds;
    }
}

